#ifndef MYAMG_DATACATCHER_H
#define MYAMG_DATACATCHER_H
#include <string>
#include <unordered_map>

namespace myamg {
    class DataCatcher {
        public:
        static DataCatcher& instance();

        void recordMatrix(const std::string &fileName, const int *rowPtr, const int *colIndex,
                             const double *values, size_t nRows, size_t nElements);

        void recordVector(const std::string &fileName, const double *values, size_t nElements);
    private:
        DataCatcher() = default;
        ~DataCatcher() = default;
        DataCatcher(const DataCatcher &) = delete;
        DataCatcher &operator=(const DataCatcher &) = delete;
        DataCatcher(DataCatcher &&) = delete;
        DataCatcher &operator=(DataCatcher &&) = delete;
        std::unordered_map<std::string, size_t> counter;
    };
}

#endif //MYAMG_DATACATCHER_H